//
//  CustomButton.m
//  CustomTabbar
//
//  Created by simon on 10-9-16.
//  Copyright 2010 simonwang142232@gmail.com. All rights reserved.
//

#import "CustomButton.h"
#import "MyTabBarItem.h"

@implementation CustomButton
@synthesize selected, item;


-(void)setSelected:(BOOL)selectedPara{
	selected = selectedPara;
	if(selected == YES){
		[self setImage:item.pressedImage forState:UIControlStateHighlighted];
		[self setImage:item.pressedImage forState:UIControlStateNormal];
	}else {
		[self setImage:item.image forState:UIControlStateHighlighted];
		[self setImage:item.image forState:UIControlStateNormal];
	}
}

-(void)setItem:(MyTabBarItem *)itemPara{
	item = itemPara;
	self.selected = NO;	
}

- (void)dealloc {
    [super dealloc];
}

@end